package com.sogou.qadev.service.login.client.group;

public class GroupProxy implements com.sogou.qadev.service.login.client.group.Group {
  private String _endpoint = null;
  private com.sogou.qadev.service.login.client.group.Group group = null;
  
  public GroupProxy() {
    _initGroupProxy();
  }
  
  private void _initGroupProxy() {
    try {
      group = (new com.sogou.qadev.service.login.client.group.GroupServiceLocator()).getGroup();
      if (group != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)group)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)group)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (group != null)
      ((javax.xml.rpc.Stub)group)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.sogou.qadev.service.login.client.group.Group getGroup() {
    if (group == null)
      _initGroupProxy();
    return group;
  }
  
  public long addGroup(long keyId, java.lang.String groupName) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.addGroup(keyId, groupName);
  }
  
  public boolean removeGroup(long keyId, long groupId) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.removeGroup(keyId, groupId);
  }
  
  public long addGroupUser(long keyId, long groupId, java.lang.String username, int popedom) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.addGroupUser(keyId, groupId, username, popedom);
  }
  
  public boolean removeGroupUser(long keyId, long groupId, long userId, int popedom) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.removeGroupUser(keyId, groupId, userId, popedom);
  }
  
  public boolean renameGroup(long keyId, long groupId, java.lang.String newGroupName) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.renameGroup(keyId, groupId, newGroupName);
  }
  
  public com.sogou.qadev.service.login.bean.Group queryGroup(long keyId, long groupId) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.queryGroup(keyId, groupId);
  }
  
  public com.sogou.qadev.service.login.bean.Group[] queryGroups(long keyId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.queryGroups(keyId, lines, pageNumber);
  }
  
  public boolean addProductAllEventGroup(long keyId, long groupId, long productId, int popedom) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.addProductAllEventGroup(keyId, groupId, productId, popedom);
  }
  
  public boolean removeProductAllEventGroup(long keyId, long groupId, long productId, int popedom) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.removeProductAllEventGroup(keyId, groupId, productId, popedom);
  }
  
  public boolean addProductAllDataGroup(long keyId, long groupId, long productId, int popedom) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.addProductAllDataGroup(keyId, groupId, productId, popedom);
  }
  
  public boolean removeProductAllDataGroup(long keyId, long groupId, long productId, int popedom) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.removeProductAllDataGroup(keyId, groupId, productId, popedom);
  }
  
  public com.sogou.qadev.service.login.bean.Group[] queryRelatedGroups(long keyId, long productId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (group == null)
      _initGroupProxy();
    return group.queryRelatedGroups(keyId, productId, lines, pageNumber);
  }
  
  
}